<template>
  <div v-if="eighth[0]">
    <div class="margin">
      <img :src="eighth[0].bannerImgSrc" alt="">
    </div>
    <div class="margin">
      <img :src="eighth[1].bannerImgSrc" alt="">
    </div>
    <div class="margin">
      <img :src="eighth[2].bannerImgSrc" alt="">
    </div>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  data () {
    return {
      eighth: []
    }
  },
  mounted () {
    window.onscroll = () => {
      if ((document.documentElement.scrollTop + document.documentElement.clientHeight) === document.documentElement.scrollHeight) {
        axios.get('/v2/page?pageId=1&tabId=1&currentPage=8&pageSize=8&_=1583394683253').then(res => {
          this.eighth = res.data.data.modules.map(item => item.moduleContent)
        })
      }
    }
  },
  destroyed () {
    window.onscroll = null
  }
}
</script>

<style lang="scss" scoped>
img{
  width: 100%;
}
.brand-img{
  display: flex;
  background: white;
  padding: 30px 15px 10px 15px;
  justify-content: space-between;
  .single-brand{
    width: 32%;
  }
}
.btmgap{
  margin-bottom: -4px;
}
</style>
